//
//  SCImagePickerCell.m
//  Shuaiche
//
//  Created by zzs on 2018/8/10.
//  Copyright © 2018年 zzs. All rights reserved.
//

#import "SCImagePickerCell.h"

@implementation SCImagePickerCell

- (void)awakeFromNib {
    [super awakeFromNib];
}

- (IBAction)pickerBtnClicked:(id)sender {
    if([self.delegate respondsToSelector:@selector(pickerViewDidSelectedCell:atIndexPath:)]){
      BOOL result =  [self.delegate pickerViewDidSelectedCell:self atIndexPath:self.cellIndexPath];
        if(!result){
            return;
        }
    }
     self.isItemSelected = !self.isItemSelected;
    if(self.isItemSelected){
        [self.pickerBtn setImage:[UIImage imageNamed:@"agent_check"] forState:UIControlStateNormal];
    }else{
        [self.pickerBtn setImage:[UIImage imageNamed:@"agent_uncheck"] forState:UIControlStateNormal];
    }
}
@end
